package com.morningstar.gateway.controller;

import com.morningstar.common.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.morningstar.common.result.ResultCode.FEED_BACK;

/**
 * @author yls
 */
@Slf4j
@RestController
public class FallbackController {

    /**
     * 熔断处理
     *
     * @return 基本结果类
     */
    @RequestMapping("/error/fallback")
    public Result<Object> fallback() {
        log.info("熔断处理");
        return Result.fail(FEED_BACK);
    }
}
